export GRUB_TERMINAL
export GRUB_SERIAL_COMMAND
if [ -n "$GRUB_TERMINAL" ]; then
  $GRUB_SERIAL_COMMAND
  terminal_output "$GRUB_TERMINAL"
  terminal_input "$GRUB_TERMINAL"
fi

insmod echo
insmod gzio
insmod minicmd
insmod normal
insmod test
set timeout=@timeout@
if [ ! "$lang" ]; then lang=@LOCALE@; fi
if [ -s $pfxfat/grubenv ]; then
  load_env --file $pfxfat/grubenv
  set default="${saved_entry}"
else
  set default=@default_id@
fi
function savedefault {
  if [ -z "${boot_once}" -a -s $pfxfat/grubenv ]; then
    saved_entry="${chosen}"
    save_env --file $pfxfat/grubenv saved_entry
  fi
}
